package cn.com.self.apis.member.service.impl;

import cn.com.self.apis.member.entity.UReportInfo;
import cn.com.self.apis.member.entity.UserAndAccountInfo;
import cn.com.self.apis.member.entity.UserAndAccountParam;
import cn.com.self.apis.member.entity.vo.UMemberInfoVO;
import cn.com.self.apis.member.mapper.AccountMapper;
import cn.com.self.apis.member.mapper.UserAndAccountInfoMapper;
import cn.com.self.apis.member.service.UserAndAccountService;
import cn.com.self.apis.portal.util.CustomPage;
import cn.com.self.apis.portal.util.ICustomPage;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

/**
 * @author hongjuzhu
 * @date 2021/6/20
 * @Description
 */
@Service
@Slf4j
public class UserAndAccountServiceImpl extends ServiceImpl<UserAndAccountInfoMapper, UserAndAccountInfo> implements UserAndAccountService {

    @Autowired
    private UserAndAccountInfoMapper userAndAccountInfoMapper;

    @Override
    public ICustomPage<UserAndAccountInfo> getAccountContrfoPage(UserAndAccountParam param) {

//        com.baomidou.mybatisplus.extension.plugins.pagination.Page<UserAndAccountInfo> page = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>();
//        page.setSize(param.getSize());
//        page.setPage(param.getPage());
        CustomPage<UserAndAccountInfo> page = new CustomPage<>(param.getPage(),param.getSize());

        ICustomPage<UserAndAccountInfo> data = userAndAccountInfoMapper.selectPageVo(page,param);

        return data;
    }
}
